/*
 * Copyright 2000-2020 ALPHA LAB.Inc All Rights Reserved.
 */
package com.alphalab.moonlight.demo.impl.trans;

import org.springframework.beans.BeanUtils;
import com.alphalab.framework.domain.AbstractValueObjectTransfer;
import com.alphalab.moonlight.demo.dao.model.Airline;
import com.alphalab.moonlight.demo.service.model.AirlineVO;

/**
 * AirlineTransfer.
 * @author allen 
 * @version 1.0.0 2018年2月20日
 */
public class AirlineTransfer extends AbstractValueObjectTransfer<AirlineVO, Airline> {

	/* (non-Javadoc)
	 * @see com.alphalab.framework.domain.AbstractValueObjectTransfer#toPO(
	 * com.alphalab.framework.domain.AbstractValueObject)
	 */
	@Override
	public Airline toPO(final AirlineVO paramVO) {
		if (paramVO == null) {
			return null;
		}
		final Airline airline = new Airline();
		BeanUtils.copyProperties(paramVO, airline);
		return airline;
	}

	/* (non-Javadoc)
	 * @see com.alphalab.framework.domain.AbstractValueObjectTransfer#toVO(
	 * com.alphalab.framework.domain.BaseEntity)
	 */
	@Override
	public AirlineVO toVO(final Airline paramPO) {
		if (paramPO == null) {
			return null;
		}
		final AirlineVO airlineVO = new AirlineVO();
		BeanUtils.copyProperties(paramPO, airlineVO);
		return airlineVO;
	}

}
